package com.ruoyi.common.service.impl;

import java.util.List;

import com.ruoyi.common.dao.TodoMapper;
import com.ruoyi.common.entity.TodoEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.service.ITodoService;

/**
 * VIEWService业务层处理
 *
 * @author dustball
 * @date 2021-04-22
 */
@Service
public class TodoServiceImpl implements ITodoService {
    @Autowired
    private TodoMapper todoMapper;

    /**
     * 查询VIEW
     *
     * @param taskid VIEWID
     * @return VIEW
     */
    @Override
    public TodoEntity selectTodoById(String taskid) {
        return todoMapper.selectTodoById(taskid);
    }

    /**
     * 查询VIEW列表
     *
     * @param todo VIEW
     * @return VIEW
     */
    @Override
    public List<TodoEntity> selectTodoList(TodoEntity todo) {
        return todoMapper.selectTodoList(todo);
    }

    /**
     * 新增VIEW
     *
     * @param todo VIEW
     * @return 结果
     */
    @Override
    public int insertTodo(TodoEntity todo) {
        return todoMapper.insertTodo(todo);
    }

    /**
     * 修改VIEW
     *
     * @param todo VIEW
     * @return 结果
     */
    @Override
    public int updateTodo(TodoEntity todo) {
        return todoMapper.updateTodo(todo);
    }

    /**
     * 批量删除VIEW
     *
     * @param taskids 需要删除的VIEWID
     * @return 结果
     */
    @Override
    public int deleteTodoByIds(String[] taskids) {
        return todoMapper.deleteTodoByIds(taskids);
    }

    /**
     * 删除VIEW信息
     *
     * @param taskid VIEWID
     * @return 结果
     */
    @Override
    public int deleteTodoById(String taskid) {
        return todoMapper.deleteTodoById(taskid);
    }
}
